﻿namespace ApiGateway.Config
{
    /// <summary>
    /// IP限流配置
    /// </summary>
    internal class IpLimitConfig
    {
        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable
        {
            get;
            set;
        } = false;
        /// <summary>
        /// 是否使用本地限流
        /// </summary>
        public bool IsLocal
        {
            get;
            set;
        } = true;
        /// <summary>
        /// 时间窗大小(秒)
        /// </summary>
        public int LimitTime
        {
            get;
            set;
        } = 2;
        /// <summary>
        /// 限制的请求数
        /// </summary>
        public int LimitNum
        {
            get;
            set;
        } = 100;
    }
}
